package com.itheima.hashset;

import java.util.HashSet;

public class Demo02 {


    public static void main(String[] args) {
        HashSet<Teacher> set = new HashSet<>();

        Teacher t1 = new Teacher(30, 172);
        Teacher t2 = new Teacher(31, 171);
        System.out.println(t1.hashCode()==t2.hashCode());
        set.add(t1);
        set.add(t2);
        System.out.println(set);
    }
}
